#include "CircularQueue.h"

void test1() {
    CircularQueue* queue = init_queue();
    for (int i = 0; i < MAX_SIZE - 1; i++) {
        enqueue(queue, i);
    }
    printf("front: %d\n", front(queue));
    printf("rear: %d\n", rear(queue));
    printf("size: %d\n", size(queue));

    if (enqueue(queue, 10)) {
        printf("enqueue: 10\n");
    }
    dequeue_all(queue);
    clear_queue(queue);
    queue = NULL;
}

int main() {
    void (*test[])() = {test1};
    int len = sizeof(test) / sizeof(*test);
    for (int i = 0; i < len; i++) {
        test[i]();
    }
}